package com.xquant.pricing.pricingConfig.service.impl;

import com.github.pagehelper.PageInfo;
import com.xquant.pricing.pricingConfig.mapper.OptionContractMapper;
import com.xquant.pricing.pricingConfig.service.OptionContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ershuai.zhao
 * @Auther: B946
 * @Date: 24/12/2019 11:42
 * @Description:
 */
@Service(OptionContractService.BEAN_NAME)
public class OptionContractServiceImpl implements OptionContractService {

    @Autowired
    private OptionContractMapper optionContractMapper;

    @Override
    public PageInfo<Map<String,Object>> queryContractCfgByPage(Map map) {
        List<Map<String,Object>> list = optionContractMapper.queryContractCfg(map);

        return new PageInfo<>(list);
    }

    @Override
    public void insertContractCfg(Map map) {
        optionContractMapper.insertContractCfg(map);
    }

    @Override
    public void updateContractCfg(Map map) {
        optionContractMapper.updateContractCfg(map);
    }

    @Override
    public void deleteContractCfg(Map map) {
        optionContractMapper.deleteContractCfg(map);
    }

    @Override
    public HashMap queryTircurveDaycounter(Map<String, Object> params) {
        return optionContractMapper.queryTircurveDaycounter(params);
    }

    @Override
    public HashMap queryTdivyieldDaycounter(Map<String, Object> params) {
        return optionContractMapper.queryTdivyieldDaycounter(params);
    }

    @Override
    public HashMap queryTvolsurfaceDaycounter(Map<String, Object> params) {
        return optionContractMapper.queryTvolsurfaceDaycounter(params);
    }

}
